package com.yihu.wlyy.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 签约医生
 * @author AndyCai
 *
 */

@Entity
@Table(name = "wlyy_sign_web")
public class SignWeb extends IdEntity {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6688234997241132373L;
	
	//签约标识
	private String code;
	//签约医生
	private String doctor;
	//签约用户
	private String user;
	//操作人（1患者，2医生）
	private int oper;
	//签约状态(0待签约，1已拒绝，2已签约，3患者申请取消签约，4医生申请取消签约，5已解约)
	private int status;
	//签约开始时间
	private Date beginDate;
	//签约结束时间
	private Date endDate;
	//签约时长（如：12个月）
	private int months;
	//申请时间
	private Date applyDate;
	
	private String releaseSpeak;
	

	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDoctor() {
		return doctor;
	}
	public void setDoctor(String doctor) {
		this.doctor = doctor;
	}
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}
	public int getOper() {
		return oper;
	}
	public void setOper(int oper) {
		this.oper = oper;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	// 设定JSON序列化时的日期格式
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	@Column(name="begin")
	public Date getBeginDate() {
		return beginDate;
	}
	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	@Column(name="end")
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public int getMonths() {
		return months;
	}
	public void setMonths(int months) {
		this.months = months;
	}
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	@Column(name="apply_date")
	public Date getApplyDate() {
		return applyDate;
	}
	public void setApplyDate(Date applyDate) {
		this.applyDate = applyDate;
	}
	
	@Column(name="release_speak")
	public String getReleaseSpeak() {
		return releaseSpeak;
	}
	public void setReleaseSpeak(String releaseSpeak) {
		this.releaseSpeak = releaseSpeak;
	}
}
